Zum Seitenanfang";
// -------------------------------------------------------------------------------------------------------------------------
$language = $_SESSION['language'];
// -------------------------------------------------------------------------------------------------------------------------
$dblink = @mysql_connect("localhost","nobody","");
$query = "SELECT id,title,name,entry,keywords from elements where language=$language order by name";
$result = mysql_db_query("geonext",$query,$dblink);
$rowno = mysql_num_rows($result);
// -------------------------------------------------------------------------------------------------------------------------
$anzahl=0;
// -------------------------------------------------------------------------------------------------------------------------
while($rowno--){
$row=mysql_fetch_row($result);
$db_id=$row[0];
$db_title=$row[1];
$db_name=str_replace("&%;","%",$row[2]);
$db_date=$row[3];
$db_keywords=$row[4];
$itemsEintrag[$anzahl++]=$db_name."[ICON]KEY:".$db_title;
$indexEintrag[$anzahl++]=$db_name."[ICON]KEY:".$db_title;
//$index.="\t\n\t\t\n\t\t\t".$db_name."";
if($db_keywords!="") {
//$index.="\n\t\t\t
\n\t\t\t";
$keys=str_replace("\r\n","#####",trim($db_keywords))."#####";
while(strpos($keys,"#####")>-1) { //<
$indexEintrag[$anzahl++]=substr($keys,0,strpos($keys,"#####"))." [ICON]".$db_name."KEY:".$db_title;
$keys=substr($keys,strpos($keys,"#####")+5,strlen($keys));
}
}
$items.="\n\t\t\n\t\n";
}
// -------------------------------------------------------------------------------------------------------------------------
setlocale (LC_ALL,'de_DE');
function vergleich ($a, $b) {
$a=str_replace("(","",strtr(strtolower($a),"Σ÷ⁿ▀","aous"));
$b=str_replace("(","",strtr(strtolower($b),"Σ÷ⁿ▀","aous"));
if ($a == $b) return 0;
return ($a < $b) ? -1 : 1;
}
usort($itemsEintrag, 'vergleich');
usort($indexEintrag, 'vergleich');
// --- Themen --------------------------------------------------------------------------------------------------------------
$items="";
foreach($itemsEintrag as $wert) {
$key=substr($wert,strpos($wert,"KEY:")+4);
$icon=" ";
$items.="";
}
$items.="";
// --- Index ---------------------------------------------------------------------------------------------------------------
$buchstabe=" ";
$ix=0;
$register[0]="";
foreach($indexEintrag as $wert) {
if(strtoupper(substr(strtr(str_replace("(",substr($wert,1,1),$wert),"─Σ╓÷▄ⁿ▀","aaoouus"),0,1))!=$buchstabe) {
$buchstabe=strtoupper(strtr(substr(str_replace("(",substr($wert,1,1),$wert),0,1),"─Σ╓÷▄ⁿ▀","aaoouus"));
$register[$ix++]=$buchstabe;
$index.=" [REGISTER]
";
}
$key=substr($wert,strpos($wert,"KEY:")+4);
$icon="
";
$icon="";
$index.="".str_replace("[ICON]",$icon,substr($wert,0,strpos($wert,"KEY:")))."";
}
$leiste="";
foreach($register as $wert1) {
$leiste.="";
foreach($register as $wert2) {
//echo "
".$wert2."
";
if($wert1==$wert2)
$leiste.="";
else
$leiste.="";
}
$leiste.="";
$index=substr($index,0,strpos($index,"[REGISTER]")).$leiste.substr($index,strpos($index,"[REGISTER]")+10);
$leiste="";
}
// =========================================================================================================================
$seiteItems="
index";
// -------------------------------------------------------------------------------------------------------------------------
$fp = fopen ("items.html", "w+");
fwrite ($fp, $seiteItems);
fclose($fp);
// =========================================================================================================================
$seiteIndex="index";
// -------------------------------------------------------------------------------------------------------------------------
$fp = fopen ("index.html", "w+");
fwrite ($fp, $seiteIndex);
fclose($fp);
// =========================================================================================================================
echo $seiteItems;
echo $seiteIndex;
// =========================================================================================================================
} else
include('error.html');
?>